package net.hn.hnms.biz.safety.water.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import net.hn.hnms.biz.safety.water.domain.GushingrealNowPo;
import net.hn.hnms.biz.safety.water.mapper.GushingrealNowPoMapper;
import net.hn.hnms.sys.common.core.domain.R;
import net.hn.hnms.biz.api.safety.monitor.model.AirVolumeVo;
import net.hn.hnms.biz.api.safety.monitor.model.PointStatistics;
import net.hn.hnms.biz.api.safety.monitor.model.PointStatus;
import net.hn.hnms.biz.api.safety.water.model.EarlyWarning;
import net.hn.hnms.biz.api.safety.water.model.PumpStatusVo;
import net.hn.hnms.biz.api.safety.water.model.RiskAssessmentVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * 智呈物联 pan'sx
 * 2022/7/28 16:07
 * 1.0 version
 */
@RestController
@RequestMapping("/riskWarning/flood")
@Api(value = "水害预警控制器", tags = {"水害预警"})
@RequiredArgsConstructor
public class RiskWarningWaterController {
    private final GushingrealNowPoMapper gushingrealNowPoMapper;

    @GetMapping("riskAssessment")
    @ApiOperation("风险评估")
    public R<RiskAssessmentVo> riskAssessment() {
        //todo
        return R.ok(new RiskAssessmentVo());
    }

    @GetMapping("outliers")
    @ApiOperation("涌水量实时信息")
    public R<List<GushingrealNowPo>> outliers() {
        return R.ok(gushingrealNowPoMapper.selectList(new LambdaQueryWrapper<>()));
    }

    @GetMapping("earlyWarning")
    @ApiOperation("预警联动")
    public R<List<EarlyWarning>> earlyWarning() {
        //todo
        return R.ok(new ArrayList<>());
    }

    @GetMapping("pumpStatus")
    @ApiOperation("水泵状态统计信息")
    public R<PumpStatusVo> pumpStatusVo() {
        //todo
        return R.ok(new PumpStatusVo());
    }

    @GetMapping("pointStatistics")
    @ApiOperation("测点统计")
    public R<List<PointStatistics>> pointStatistics() {
        //todo
        return R.ok(new ArrayList<>());
    }

    @GetMapping("pointStatus")
    @ApiOperation("测点状态")
    public R<PointStatus> pointStatus() {
        //todo
        return R.ok(new PointStatus());
    }
    @GetMapping("airVolume")
    @ApiOperation("工作面风量")
    public R<AirVolumeVo> airVolume(@ApiParam(value = "工作面id", required = true) String faceId) {
        //todo
        return R.ok(new AirVolumeVo());
    }
}
